<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ include file="/page/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<%@ include file="/adapter/adapter-bootstrap.jsp"%>
<link
	href="${pageContext.request.contextPath}/frontframe/easyui/themes/easyui-extend.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript">
	function save() {
		//将参数里的&号转为~号
		var str_data = $("#form1 input").map(function() {
			return ($(this).attr("name") + '=' + $(this).val().replace(/&/g,"~"));
		}).get().join("&");
		$.ajax({
			url : "${ctx}/appwxRespDetail/addwxRespDetail",
			type : "POST",
			dataType : "json",
			data : str_data,
			async : false,
			success : function(data) {
				if (data.flag > 0) {
					alert("保存成功！");
					//window.location.reload();
				}
				/* 	          $.each(data, function(index, element) {
				 window.location.reload();
				 }); */
			},
			error : function() {
				alert("error");
			}
		});

	}

	function changeValue(Value, tagname) {
		document.getElementById(tagname).value = Value;
	}

	function goBack() {
		window.history.back(-1);
	}
</script>
</head>
<body>
	<div class="panel panel-default">
		<div class="panel-heading">
			<h3 class="panel-title">微信响应详情</h3>
		</div>
		<div class="panel-body">
			<form class="form-horizontal" role="form" id="form1">
				<div class="form-group">
					
					<label class="col-xs-2 control-label" for="wx_resp_actionid">响应动作编号</label>
					<div class="col-xs-4">
						<input class="form-control" id="wx_resp_actionid" name="wx_resp_actionid" type="text" placeholder="对于自动回复，为用户发送的内容" />
					</div>
					
					<label class="col-xs-2 control-label" for="wx_resp_rank">响应顺序</label>
					<div class="col-xs-4">
						<input class="form-control" id="wx_resp_rank" name="wx_resp_rank" type="text" placeholder="起始值为“0”" />
					</div>
				</div>
				<div class="form-group">
					
					<label class="col-xs-2 control-label" for="wx_resp_pic_title">响应标题</label>
					<div class="col-xs-4">
						<input class="form-control" id="wx_resp_pic_title" name="wx_resp_pic_title" type="text" placeholder="图片上显示的字" />
					</div>
					<label class="col-xs-2 control-label" for="wx_resp_pic_path">图片地址</label>
					<div class="col-xs-4">
						<input class="form-control" id="wx_resp_pic_path" name="wx_resp_pic_path" type="text" placeholder="图片的存放位置" />
					</div>
					
				</div>
				<div class="form-group">
					
					<label class="col-xs-2 control-label" for="wx_resp_pic_url">图片跳转链接</label>
					<div class="col-xs-4">
						<input class="form-control" id="wx_resp_pic_url" name="wx_resp_pic_url" type="text" placeholder="点击图片时跳转的链接" />
					</div>
					<label class="col-xs-2 control-label" for="wx_resp_pic_desc">图片简介</label>
					<div class="col-xs-4">
						<input class="form-control" id="wx_resp_pic_desc" name="wx_resp_pic_desc" type="text" placeholder="只有单图文时才显示的一小段文字" />
					</div>
				<div class="form-group  text-center">
					<button type="button" class="btn btn-default" onclick="save();">保存</button>
					<button type="button" class="btn btn-default" onclick="goBack()">返回</button>
				</div>
			</form>
		</div>
	</div>

</body>
</html>
